/*
 * charger_tester.c
 *
 * Created: 19.03.2013 10:10:58
 *  Author: saenko
 */ 


#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h> 
#include "uart.h"

int main(void)
{
	
	uart_init();

	
	sei();
	
//	printstr_p(PSTR("UART OK\n"));
	adcm_init();	
    while(1)
    {
        if(uart_flags.rxstring_end)
		{
			uart_flags.rxstring_end=0;
			adc_change_channel(0);
			putchr(adc_convert());
			
						adc_change_channel(1);
						putchr(adc_convert());
						
									adc_change_channel(2);
									putchr(adc_convert());
		
		}			
    }
}